package user

import (
	"gorm.io/gorm"
	"time"
)

type WxUser struct {
	ID        uint           `gorm:"primaryKey" json:"id" gorm:"not null;comment:用户id"`
	UserId    uint           `json:"user_id" gorm:"not null;comment:用户ID"`
	IdNum     string         `json:"id_num" gorm:"size:50;comment:身份证号"`
	Name      string         `json:"name" gorm:"size:50;not null;default:'';comment:真实姓名" `
	Mobile    string         `json:"mobile" gorm:"size:11;not null;default:'';comment:手机号" `
	Note      string         `json:"note" gorm:"size:200;not null;default:'';comment:备注" comment:"备注"`
	CreatedAt time.Time      `gorm:"autoUpdateTime"json:"createAt"`
	UpdatedAt time.Time      `gorm:"autoUpdateTime"json:"updatedAt"`
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

// 覆盖生成表
func (WxUser) TableName() string {
	return "xk_wechat_user"
}
